package org.carabiner.infopanel;

import java.awt.Color;
import java.awt.Component;

import javax.swing.Icon;

/**
 * Interface for defining messages that can be shown in a
 * {@link CarabinerMessageTreeModel}.
 * 
 * <p>
 * Carabiner Testing Framework
 * </p>
 * <p>
 * Copyright: <a href="http://www.gnu.org/licenses/gpl.html">GNU Public License</a>
 * </p>
 * 
 * @author John Januskey (john.januskey@gmail.com)
 * 
 */
public interface CarabinerMessage
{
  /**
   * Returns the icon associated with the message, null if there is no icon
   * assocated with the message.
   * 
   * @return Icon
   */
  public Icon getIcon();

  /**
   * Returns the name of the message.
   * 
   * @return String
   */
  public String getName();

  /**
   * Returns a String representation of the message.
   * 
   * @return String
   */
  public String toString();

  /**
   * Returns the component associated with the message.
   * 
   * @return Component
   */
  public Component getComponent();

  /**
   * Returns the color to be used when this message is selected in an infoPanel.
   * 
   * @return Color
   */
  public Color getHighlightColor();

  /**
   * Gets the user-presentable name for this component. If defined, this will be
   * the value of the component's <code>name</code> property.
   * 
   * @return String
   */
  public String getComponentName();
}
